using IQIGame.Onigao.GamePlay;

namespace IQIGame.Onigao.Logic
{
    /// <summary>
    /// 开始道具提交
    /// </summary>
    public class ExecStartItemSubmit : BaseServiceExecution
    {
        public override void Execute(LevelRegion region, LevelPlayer player)
        {
            ExecParamStartItemSubmit config = _config as ExecParamStartItemSubmit;
            if (config.cid <= 0)
            {
                LogicLog.LogError($"掉落执行id的cid参数不合法：{config.cid}");
                return;
            }
            triggerEntity.OccupiedBy(EntityOccupationStatus.ItemSubmit, config.cid, player.entity);
            player.entity.OccupiedBy(EntityOccupationStatus.ItemSubmit, config.cid, triggerEntity);
            region.NotifyStartItemSubmit(player, config.cid);
        }
    }
}
